from flask import current_app, jsonify
from flask import render_template

from info.response_code import RET
from . import index_blue


@index_blue.route("/")
def index():
    """网站主页,跟路由"""
    return render_template("news/index.html")


@index_blue.route("/favicon.ico")
def favicon():
    return current_app.send_static_file("news/favicon.ico")

@index_blue.route("/login")
def login():
    return jsonify(errno=RET.OK, errmsg="登录成功")